﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EntryExit
{
    public partial class RedirectInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MainMaster)this.Master).HideSearch();

            string redirectPage = Request.QueryString["page"];
            string shiftUrl;
            switch (redirectPage)
            {
                case "shift":
                        shiftUrl = "javascript:window.open('" + ConfigMgr.Instance.GetValue(ConfigKeys.CNFG_SHIFT_SDTOOL) + "','_blank');";
                        linkInfo.Attributes.Add("onclick", shiftUrl);
                        linkInfo.InnerText = "Click here to redirect to shift planner";
                        lblRedirectInfo.Text = "Please define the shift using shift planner. Make sure pop-up is enabled to get the screen.";
                    break;

                case "leave":
                         shiftUrl = "javascript:window.open('" + ConfigMgr.Instance.GetValue(ConfigKeys.CNFG_LEAVE_LMS) + "','_blank');";
                        linkInfo.Attributes.Add("onclick", shiftUrl);
                        linkInfo.InnerText = "Click here to redirect to LMS";
                        lblRedirectInfo.Text = "Please view the leave calendar using LMS. Make sure pop-up is enabled to get the screen.";
                    break;
            }

           
        }
    }
}